/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:47 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Chucnang_TacvuEntity
    {
        public Chucnang_TacvuEntity()
        {
			m_pk_ichucnang_tacvuid=0;
			m_fk_ichucnangid=0;
			m_fk_itacvuid=0;
			m_sghichu="";
        }
		private Int64 m_pk_ichucnang_tacvuid;
		public Int64 PK_iChucnang_TacvuID
		{
			get { return m_pk_ichucnang_tacvuid ; }
			set { m_pk_ichucnang_tacvuid = value; }
		}
		private Int32 m_fk_ichucnangid;
		public Int32 FK_iChucnangID
		{
			get { return m_fk_ichucnangid ; }
			set { m_fk_ichucnangid = value; }
		}
		private Int32 m_fk_itacvuid;
		public Int32 FK_iTacvuID
		{
			get { return m_fk_itacvuid ; }
			set { m_fk_itacvuid = value; }
		}
		private String m_sghichu;
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}

        #region Comparison
        public static List<Chucnang_TacvuEntity> Sort(List<Chucnang_TacvuEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Chucnang_TacvuEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Chucnang_TacvuEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Chucnang_TacvuEntity> COMPARISON_PK_iChucnang_TacvuID
		{
			get
			{
				return delegate(Chucnang_TacvuEntity entity,Chucnang_TacvuEntity other)
				{
					return entity.PK_iChucnang_TacvuID.CompareTo(other.PK_iChucnang_TacvuID);
				};
			}
		}
		public static Comparison<Chucnang_TacvuEntity> COMPARISON_FK_iChucnangID
		{
			get
			{
				return delegate(Chucnang_TacvuEntity entity,Chucnang_TacvuEntity other)
				{
					return entity.FK_iChucnangID.CompareTo(other.FK_iChucnangID);
				};
			}
		}
		public static Comparison<Chucnang_TacvuEntity> COMPARISON_FK_iTacvuID
		{
			get
			{
				return delegate(Chucnang_TacvuEntity entity,Chucnang_TacvuEntity other)
				{
					return entity.FK_iTacvuID.CompareTo(other.FK_iTacvuID);
				};
			}
		}
		public static Comparison<Chucnang_TacvuEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(Chucnang_TacvuEntity entity,Chucnang_TacvuEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
        #endregion
    }
}
